package com.zxl.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zxl.common.model.pojo.SysShoppingCart;
import com.zxl.common.model.vo.goods.GoodsCartVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 购物车 Mapper 接口
 * </p>
 *
 * @author zxw
 * @since 2023-03-30
 */
public interface SysShoppingCartMapper extends BaseMapper<SysShoppingCart> {

    List<GoodsCartVo> getMemberGoodsCart(Integer memberId);

    void deleteByGoodsCode(@Param("memberId") Integer memberId, @Param("goodsCodes") List<String> goodsCodes);

    void updateCartGoodsNum(Integer memberId, String goodsCode, Integer goodsNum, BigDecimal totalPrice);
}
